package cn.ssm.util;

import java.util.List;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.ssm.biz.impl.UserBizImpl;
import cn.ssm.pojo.User;

public class demo {
	@Test
	public void ttt() {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				"beans.xml");
		
//		RepairlistBizImpl ubi = (RepairlistBizImpl)context.getBean("RImpl");
//		List<Repairlist> r=ubi.addRepairlist(5);
//		  for(Repairlist l:r){
//			  System.out.println(l.getTeacherId());
//			  
//		  }
		
/*
		ComputerinfoBizImpl ubi = (ComputerinfoBizImpl) context
				.getBean("CImpl");
		Computerinfo comp = new Computerinfo();
		
		comp.setComputerId(1);
		comp.setComputerroomId(5);
		Computerinfo c = ubi.addComputerinfo(comp);
		System.out.println(c.getFaName());
		*/
		
//		 UserBizImpl ubi = (UserBizImpl)context.getBean("UBizImpl");
//		 
//		 List<User> u=ubi.findUserList();
//		 User uo=new User();
//		 uo.setUserName("admin");
//		System.out.println(u.contains(uo)); 
//		
//		 
//		for (User ur : u) {
//			System.out.println(ur.getUserName());
//		}
		 
	}

}
